<?php
class AsyncController extends  ApiController{

    public function init(){
        parent::init();

        $this->raw_data = $this->getRequest()->getParam('raw_data');
        $this->wechat->setPostXml($this->raw_data)->getRev();
    }   
 
    public function unSubscribeAction(){
        
        $openId = $this->wechat->getRevFrom();
        
        $model = new Model('t_wx_user');
        $model->update(['subscribe'=>0],['openid'=>$openId]);
    }
}

?>
